 #define  _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;
//class A 
//{
//public:
//	A(const char* s) { cout << s << endl; }
//	~A() {}
//};
//class B :virtual public A
////class B : public A
//{
//public:
//	B(const char* s1, const char* s2) :A(s1) { cout << s2 << endl; }
//}; 
////class C : public A
//class C :virtual public A
//{
//public:
//	C(const char* s1, const char* s2) :A(s1) { cout << s2 << endl; }
//};
//class D :public B, public C
//{
//public:
//	D(const char* s1, const char* s2, const char* s3, const char* s4) :B(s1, s2), C(s1, s3),A(s1)
//	{
//		cout << s4 << endl;
//	}
//};
//int main() {
//	D* p = new D("class A", "class B", "class C", "class D");
//	delete p;
//	return 0;
//}

class A
{
public:
	int _a;
};

class B:virtual public A
{
public:
	int _b;
};


class C:virtual public A
{
public:
	int _c;
};


class D :public B,public C
{
public:
	int _d;
};

int main()
{
	D d;
	d.B::_a = 1;
	d._b = 1;


	d.C::_a = 2;
	d._c = 2;

	d._d = 4;
}